package com.qianke.domain.enums;

/**
 * 配置管理类型
 */
public enum AdminConfigTypeEnum {

    USER_MODAL(1, "用户画像"),
    TRAIL_LESSON_FAIL(2, "试听课预约失败"),
    TRAIL_LESSON_ABSENT(3, "试听课缺席"),
    TRAIL_LESSON_FEED_BACK(4, "试听课课后反馈");

    AdminConfigTypeEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    private Integer code;
    private String text;

    public Integer getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static AdminConfigTypeEnum fromCode(Integer code) {
        for (AdminConfigTypeEnum oneZeroEnum : AdminConfigTypeEnum.values()) {
            if (oneZeroEnum.getCode().equals(code)) {
                return oneZeroEnum;
            }
        }
        return null;
    }
}
